﻿@{
    ViewBag.Title = "Music Player For Html5";
}
@section head{
}

<h2>“@(ViewBag.UserName)”的播放列表</h2>
<div class="player_list">
    @PlayerUrls(ViewBag.List ?? null)
</div>


@helper PlayerUrls(List<Html5Music.Model.PlayList> list)
{
    if (list == null)
    {
        return;
    }
    
    <text>
    <ul>
        @{
            if (list != null && list.Count > 0)
            {
                foreach (var item in list)
                {
                    if (!item.Share)
                    {
                        continue;
                    }
                    string url = string.Format("/player/{0}", item.Key);
            <text>
            <li>
                <a href="@(url)" target="_blank">@(item.Title)</a>
            </li>
            </text>
                }
            }
            else
            {  
            <text>
            <h3 class="not_list">暂无列表</h3>
            </text>
            }
        }
    </ul>
    </text>
}